package com.ihelp.rest.mis.platform.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.ihelp.rest.mis.platform.service.AbnormaltitleService;
import com.ihelp.rest.mis.pojo.Abnormaltitle;
import com.ihelp.rest.utils.HtmlUtil;

@Controller
@RequestMapping("/system/Abnormaltitle")
public class AbnormaltitleController {
	@Autowired
	private AbnormaltitleService AbnormaltitleService;
	
	@RequestMapping("AbnormaltitleList.do")
	public String AbnormaltitleList(HttpServletRequest request){
		return "system/Abnormaltitle/AbnormaltitleList";
	}
	
	@RequestMapping("jsonAbnormaltitlePageList.do")
	public void jsonAbnormaltitlePageList(HttpServletResponse response, Abnormaltitle queryCondition,int page,int rows,String sort, String order){
		String json = this.AbnormaltitleService.findAbnormaltitlePage(queryCondition, page, rows, sort, order);
		HtmlUtil.writerJson(response, json);
	}
	
	@RequestMapping("doSaveAbnormaltitle.do")
	public void doSaveAbnormaltitle(HttpServletResponse response, Abnormaltitle Abnormaltitle){
		String result = this.AbnormaltitleService.saveAbnormaltitle(Abnormaltitle);
		HtmlUtil.sendDirectToClient(response,result);
	}
	
	@RequestMapping("doDelAbnormaltitle.do")
	public void doDelAbnormaltitle(HttpServletResponse response, String ids){
		String result = this.AbnormaltitleService.delAbnormaltitle(ids);
		HtmlUtil.sendDirectToClient(response,result);
	}
}
